<?php
session_start();
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/database.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/functions.php');
require($_SERVER['DOCUMENT_ROOT'].'/resources/lib/class.admin.php');
$admin=new admin();
$admin->canView($_SERVER['PHP_SELF']);
$id=$_GET['id'];
$admin->pageId($id)->deletePage();

?>
<script>
$.fn.loader('add_page_form');
$.fn.loader('current_pages_list');
</script>
